import http from '@/utils/request'

export interface IChildInfo {
  name: string
  score?: number
  id?: string
  parentId?: string
}

export async function addChild(data: IChildInfo): Promise<void> {
  return http('child/add', data)
}

export async function getChild(): Promise<IChildInfo[]> {
  return http('child/list')
}

export async function removeChild(data: Pick<IChildInfo, 'id'>): Promise<void> {
  return http('child/remove', data)
}
